package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ProfessionalAchievementMapper;
import com.ruoyi.system.domain.ProfessionalAchievement;
import com.ruoyi.system.service.IProfessionalAchievementService;

/**
 * 专业业绩Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-28
 */
@Service
public class ProfessionalAchievementServiceImpl implements IProfessionalAchievementService 
{
    @Autowired
    private ProfessionalAchievementMapper professionalAchievementMapper;

    /**
     * 查询专业业绩
     * 
     * @param id 专业业绩主键
     * @return 专业业绩
     */
    @Override
    public ProfessionalAchievement selectProfessionalAchievementById(Long id)
    {
        return professionalAchievementMapper.selectProfessionalAchievementById(id);
    }

    /**
     * 查询专业业绩列表
     * 
     * @param professionalAchievement 专业业绩
     * @return 专业业绩
     */
    @Override
    public List<ProfessionalAchievement> selectProfessionalAchievementList(ProfessionalAchievement professionalAchievement)
    {
        return professionalAchievementMapper.selectProfessionalAchievementList(professionalAchievement);
    }

    /**
     * 新增专业业绩
     * 
     * @param professionalAchievement 专业业绩
     * @return 结果
     */
    @Override
    public int insertProfessionalAchievement(ProfessionalAchievement professionalAchievement)
    {
        professionalAchievement.setCreateTime(DateUtils.getNowDate());
        return professionalAchievementMapper.insertProfessionalAchievement(professionalAchievement);
    }

    /**
     * 修改专业业绩
     * 
     * @param professionalAchievement 专业业绩
     * @return 结果
     */
    @Override
    public int updateProfessionalAchievement(ProfessionalAchievement professionalAchievement)
    {
        professionalAchievement.setUpdateTime(DateUtils.getNowDate());
        return professionalAchievementMapper.updateProfessionalAchievement(professionalAchievement);
    }

    /**
     * 批量删除专业业绩
     * 
     * @param ids 需要删除的专业业绩主键
     * @return 结果
     */
    @Override
    public int deleteProfessionalAchievementByIds(Long[] ids)
    {
        return professionalAchievementMapper.deleteProfessionalAchievementByIds(ids);
    }

    /**
     * 删除专业业绩信息
     * 
     * @param id 专业业绩主键
     * @return 结果
     */
    @Override
    public int deleteProfessionalAchievementById(Long id)
    {
        return professionalAchievementMapper.deleteProfessionalAchievementById(id);
    }
}
